package com.linkage.dao.impl;

import org.springframework.orm.hibernate3.HibernateTemplate;

import com.linkage.dao.ICustomerDao;
import com.linkage.model.Customer;

public class CustomerDao implements ICustomerDao 
{
	
	private HibernateTemplate hibernateTemplate;
	
	/**
	 * @param hibernateTemplate the hibernateTemplate to set
	 */
	public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
		this.hibernateTemplate = hibernateTemplate;
	}


	@Override
	public boolean register(Customer customer) 
	{
		try
		{
			hibernateTemplate.save(customer);
			 return true;
		}
		catch (Exception e)
		{
//			return false;
			e.printStackTrace();
			return false;
		}
	}

}
